﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace XcoAppSpaces.Core.Ports
{
	/// <summary>
	/// Defines a causality which is used for error handling, with ports for exceptions and ack messages.
	/// </summary>
	public interface ICausality
	{
		/// <summary>
		/// The exception port of the causality. When an exception is not handled within the processing method of a port, it is posted to this exception port.
		/// </summary>
		IPort<Exception> ExceptionPort { get; }
		
		/// <summary>
		/// The ack port of the causality. An ack is posted either when a message was transferred successfully to another space, or when it was locally processed successfully.
		/// </summary>
		IPort<Ack> AckPort { get; }
	}
}
